const express = require('express')
const app = express();
const port = process.env.PORT || 3000;

app.get("/", (req, res) => {
    res.send("hello world");
})

app.get("/json", (req, res) => {
    const responseData = {
        code: 200,
        data: {
            msg: "This is Express Project"
        },
        message: "success",
    }
    res.send(JSON.stringify(responseData));
})

app.listen(port, () => {
    console.log(`Express server listening on port:  ${port}`);
})